﻿ 
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Net;
using System.Threading.Tasks;

namespace LightingPlatform.Chaneels
{
    public partial class Services
    {
		public async Task<LightingPlatform.Chaneels.ServiceReference.HelloWorldResponse> HelloWorld(LightingPlatform.Chaneels.ServiceReference.HelloWorldRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.HelloWorldRequest, LightingPlatform.Chaneels.ServiceReference.HelloWorldResponse>(LightingServiceInterface.BeginHelloWorld, LightingServiceInterface.EndHelloWorld, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.GetStaticResourceResponse> GetStaticResource(LightingPlatform.Chaneels.ServiceReference.GetStaticResourceRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.GetStaticResourceRequest, LightingPlatform.Chaneels.ServiceReference.GetStaticResourceResponse>(LightingServiceInterface.BeginGetStaticResource, LightingServiceInterface.EndGetStaticResource, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.SearchProdNameResponse> SearchProdName(LightingPlatform.Chaneels.ServiceReference.SearchProdNameRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.SearchProdNameRequest, LightingPlatform.Chaneels.ServiceReference.SearchProdNameResponse>(LightingServiceInterface.BeginSearchProdName, LightingServiceInterface.EndSearchProdName, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.LoginResponse> Login(LightingPlatform.Chaneels.ServiceReference.LoginRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.LoginRequest, LightingPlatform.Chaneels.ServiceReference.LoginResponse>(LightingServiceInterface.BeginLogin, LightingServiceInterface.EndLogin, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.SearchProdListResponse> SearchProdList(LightingPlatform.Chaneels.ServiceReference.SearchProdListRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.SearchProdListRequest, LightingPlatform.Chaneels.ServiceReference.SearchProdListResponse>(LightingServiceInterface.BeginSearchProdList, LightingServiceInterface.EndSearchProdList, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.SearchProdListToPDFResponse> SearchProdListToPDF(LightingPlatform.Chaneels.ServiceReference.SearchProdListToPDFRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.SearchProdListToPDFRequest, LightingPlatform.Chaneels.ServiceReference.SearchProdListToPDFResponse>(LightingServiceInterface.BeginSearchProdListToPDF, LightingServiceInterface.EndSearchProdListToPDF, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.SearchProdListToExcelResponse> SearchProdListToExcel(LightingPlatform.Chaneels.ServiceReference.SearchProdListToExcelRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.SearchProdListToExcelRequest, LightingPlatform.Chaneels.ServiceReference.SearchProdListToExcelResponse>(LightingServiceInterface.BeginSearchProdListToExcel, LightingServiceInterface.EndSearchProdListToExcel, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.GetUsersResponse> GetUsers(LightingPlatform.Chaneels.ServiceReference.GetUsersRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.GetUsersRequest, LightingPlatform.Chaneels.ServiceReference.GetUsersResponse>(LightingServiceInterface.BeginGetUsers, LightingServiceInterface.EndGetUsers, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.AddUserResponse> AddUser(LightingPlatform.Chaneels.ServiceReference.AddUserRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.AddUserRequest, LightingPlatform.Chaneels.ServiceReference.AddUserResponse>(LightingServiceInterface.BeginAddUser, LightingServiceInterface.EndAddUser, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.UpdateUserResponse> UpdateUser(LightingPlatform.Chaneels.ServiceReference.UpdateUserRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.UpdateUserRequest, LightingPlatform.Chaneels.ServiceReference.UpdateUserResponse>(LightingServiceInterface.BeginUpdateUser, LightingServiceInterface.EndUpdateUser, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<bool> DeleteUser(int id)
        {
			try
			{
				return await Task.Factory.FromAsync<int, bool>(LightingServiceInterface.BeginDeleteUser, LightingServiceInterface.EndDeleteUser, id, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.AddProdResponse> AddProd(LightingPlatform.Chaneels.ServiceReference.AddProdRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.AddProdRequest, LightingPlatform.Chaneels.ServiceReference.AddProdResponse>(LightingServiceInterface.BeginAddProd, LightingServiceInterface.EndAddProd, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.UpdateProdResponse> UpdateProd(LightingPlatform.Chaneels.ServiceReference.UpdateProdRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.UpdateProdRequest, LightingPlatform.Chaneels.ServiceReference.UpdateProdResponse>(LightingServiceInterface.BeginUpdateProd, LightingServiceInterface.EndUpdateProd, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<bool> DeleteProd(int id)
        {
			try
			{
				return await Task.Factory.FromAsync<int, bool>(LightingServiceInterface.BeginDeleteProd, LightingServiceInterface.EndDeleteProd, id, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.SearchProdClassResponse> SearchProdClass(LightingPlatform.Chaneels.ServiceReference.SearchProdClassRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.SearchProdClassRequest, LightingPlatform.Chaneels.ServiceReference.SearchProdClassResponse>(LightingServiceInterface.BeginSearchProdClass, LightingServiceInterface.EndSearchProdClass, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.SearchProdSeriesResponse> SearchProdSeries(LightingPlatform.Chaneels.ServiceReference.SearchProdSeriesRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.SearchProdSeriesRequest, LightingPlatform.Chaneels.ServiceReference.SearchProdSeriesResponse>(LightingServiceInterface.BeginSearchProdSeries, LightingServiceInterface.EndSearchProdSeries, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.SearchProdSeriesToPDFResponse> SearchProdSeriesToPDF(LightingPlatform.Chaneels.ServiceReference.SearchProdSeriesToPDFRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.SearchProdSeriesToPDFRequest, LightingPlatform.Chaneels.ServiceReference.SearchProdSeriesToPDFResponse>(LightingServiceInterface.BeginSearchProdSeriesToPDF, LightingServiceInterface.EndSearchProdSeriesToPDF, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.SearchProdSeriesToExcelResponse> SearchProdSeriesToExcel(LightingPlatform.Chaneels.ServiceReference.SearchProdSeriesToExcelRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.SearchProdSeriesToExcelRequest, LightingPlatform.Chaneels.ServiceReference.SearchProdSeriesToExcelResponse>(LightingServiceInterface.BeginSearchProdSeriesToExcel, LightingServiceInterface.EndSearchProdSeriesToExcel, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.SearchPrimaryProdInfoResponse> SearchPrimaryProdInfo(LightingPlatform.Chaneels.ServiceReference.SearchPrimaryProdInfoRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.SearchPrimaryProdInfoRequest, LightingPlatform.Chaneels.ServiceReference.SearchPrimaryProdInfoResponse>(LightingServiceInterface.BeginSearchPrimaryProdInfo, LightingServiceInterface.EndSearchPrimaryProdInfo, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.SearchPrimaryProdInfoToPDFResponse> SearchPrimaryProdInfoToPDF(LightingPlatform.Chaneels.ServiceReference.SearchPrimaryProdInfoToPDFRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.SearchPrimaryProdInfoToPDFRequest, LightingPlatform.Chaneels.ServiceReference.SearchPrimaryProdInfoToPDFResponse>(LightingServiceInterface.BeginSearchPrimaryProdInfoToPDF, LightingServiceInterface.EndSearchPrimaryProdInfoToPDF, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.SearchPrimaryProdInfoToExcelResponse> SearchPrimaryProdInfoToExcel(LightingPlatform.Chaneels.ServiceReference.SearchPrimaryProdInfoToExcelRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.SearchPrimaryProdInfoToExcelRequest, LightingPlatform.Chaneels.ServiceReference.SearchPrimaryProdInfoToExcelResponse>(LightingServiceInterface.BeginSearchPrimaryProdInfoToExcel, LightingServiceInterface.EndSearchPrimaryProdInfoToExcel, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.SearchProdInfoResponse> SearchProdInfo(LightingPlatform.Chaneels.ServiceReference.SearchProdInfoRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.SearchProdInfoRequest, LightingPlatform.Chaneels.ServiceReference.SearchProdInfoResponse>(LightingServiceInterface.BeginSearchProdInfo, LightingServiceInterface.EndSearchProdInfo, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.SearchProdInfoToPDFResponse> SearchProdInfoToPDF(LightingPlatform.Chaneels.ServiceReference.SearchProdInfoToPDFRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.SearchProdInfoToPDFRequest, LightingPlatform.Chaneels.ServiceReference.SearchProdInfoToPDFResponse>(LightingServiceInterface.BeginSearchProdInfoToPDF, LightingServiceInterface.EndSearchProdInfoToPDF, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.SearchProdInfoToExcelResponse> SearchProdInfoToExcel(LightingPlatform.Chaneels.ServiceReference.SearchProdInfoToExcelRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.SearchProdInfoToExcelRequest, LightingPlatform.Chaneels.ServiceReference.SearchProdInfoToExcelResponse>(LightingServiceInterface.BeginSearchProdInfoToExcel, LightingServiceInterface.EndSearchProdInfoToExcel, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

		public async Task<LightingPlatform.Chaneels.ServiceReference.SearchRecommendedProdResponse> SearchRecommendedProd(LightingPlatform.Chaneels.ServiceReference.SearchRecommendedProdRequest request)
        {
			try
			{
				return await Task.Factory.FromAsync<LightingPlatform.Chaneels.ServiceReference.SearchRecommendedProdRequest, LightingPlatform.Chaneels.ServiceReference.SearchRecommendedProdResponse>(LightingServiceInterface.BeginSearchRecommendedProd, LightingServiceInterface.EndSearchRecommendedProd, request, null);
            }
            catch (Exception e)
            {
                throw e;
            }
		}

	
    }
}
